<?php
/**
 * 	Portal
 *
 * @category   Portal
 * @package    Portal
 * @copyright  Copyright (c) 2009 Nathan Keyes
 * @author $Author: nkeyes $
 * @version    $Id: File.php 7 2009-11-14 22:42:08Z nkeyes $
 */
 
class Bushido_DbTable_Gallery extends Bushido_Db_Table_Abstract
{
	protected $_name = 'gallery';
	protected $_niceName = 'Gallery';
	protected $_sequence = true;
	
	protected $_referenceMap = array
	(
		'User' => array
		(
			'columns' => 'bushido_user_id',
			'refTableClass' => 'Bushido_DbTable_User',
			'refColumns' => 'bushido_user_id'
		),
	);
	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/Db/Table/Bushido_Db_Table_Abstract#_setFieldDetails()
	 */
	protected function _setFieldDetails()
	{
		//bushido_user_id
		$this->_metadata['bushido_user_id']['fieldDetails'] = array
		(
			'type' => 'generated',
			'defaultValue' => Bushido_App::session()->userInfo['bushido_user_id'],
		);
	}

	
	/**
	 * (non-PHPdoc)
	 * @see library/Bushido/Table/Bushido_Table_Abstract#getDisplayValue()
	 */
	public static function getDisplayValue(Zend_Db_Table_Row_Abstract $row, $context = null)
	{
		return $row->description;
	}
}